package com.foreknow.demo2;

import java.util.Scanner;

/**
 * do....while循环
 */
public class LoopDemo3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        boolean isRight;

        do {
            isRight = true;
            System.out.println("***************************");
            System.out.println("1. 客户信息管理");
            System.out.println("2. 客户信息反馈");
            System.out.println("3. 客户信息注销");
            System.out.println("***************************");
            System.out.println("请输入数字: ");
            int choice = input.nextInt();
            if(choice == 1) {
                System.out.println("执行客户信息管理");
            }else if(choice == 2) {
                System.out.println("执行客户信息反馈");
            }else if(choice == 3) {
                System.out.println("执行客户信息注销");
            }else {
                System.out.println("输入错误，请重新输入数字");
                isRight = false;
            }
        }while(!isRight);
        System.out.println("程序结束......");
    }
}
